package com.keyholesoftware.trango.service;

import java.io.Serializable;
import java.util.List;

import com.keyholesoftware.trango.entity.Entity;

public interface PersistentService<Q> {

	public Long count();

	public Q createQuery(String queryString);

	public <E extends Entity> List<E> find(Q query);

	public <E extends Entity> E find(Serializable identifier, String... eagerPaths);

	public <E extends Entity> List<E> findAll(String... eagerPaths);

	public <E extends Entity> E merge(E entity);

	public <E extends Entity> E persist(E entity);

	public <E extends Entity> void remove(Serializable identifier, E entity);
}